[POWERPC][XEN] Add support for || as a xen/dom0 commandline divider.
authorHollis Blanchard <hollisb@us.ibm.com>
Tue, 12 Dec 2006 20:35:07 +0000 (14:35 -0600)
committerHollis Blanchard <hollisb@us.ibm.com>
Tue, 12 Dec 2006 20:35:07 +0000 (14:35 -0600)
Signed-off-by: Jerone Young <jyoung5@us.ibm.com>
Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
--HG--
extra : transplant_source : %DB%C7M%B1JK9%D3Y6_%CF%82W%21m%96%8F%A2i

xen/arch/powerpc/boot_of.c

index 8f66c65155d03df2fb305ad6300c2fa248585f86..28bcf4014af2d2fb21e6d7ec1f6198f5bebfd6d8 100644 (file)
@@ -1070,10 +1070,11 @@ static void * __init boot_of_module(ulong r3, ulong r4, multiboot_info_t *mbi)
     static module_t mods[4];
     ulong mod0_start;
     ulong mod0_size;
-    static const char sepr[] = " -- ";
+    static const char * sepr[] = {" -- ", " || "};
+    int sepr_index;
     extern char dom0_start[] __attribute__ ((weak));
     extern char dom0_size[] __attribute__ ((weak));
-    const char *p;
+    const char *p = NULL;
     int mod;
     void *oft;
 
@@ -1124,11 +1125,18 @@ static void * __init boot_of_module(ulong r3, ulong r4, multiboot_info_t *mbi)
 
     of_printf("%s: dom0 mod @ 0x%016x[0x%x]\n", __func__,
               mods[mod].mod_start, mods[mod].mod_end);
-    p = strstr((char *)(ulong)mbi->cmdline, sepr);
+
+    /* look for delimiter: "--" or "||" */
+    for (sepr_index = 0; sepr_index < ARRAY_SIZE(sepr); sepr_index++){
+        p = strstr((char *)(ulong)mbi->cmdline, sepr[sepr_index]);
+        if (p != NULL)
+            break;
+    }
+
     if (p != NULL) {
         /* Xen proper should never know about the dom0 args.  */
         *(char *)p = '\0';
-        p += sizeof (sepr) - 1;
+        p += strlen(sepr[sepr_index]);
         mods[mod].string = (u32)(ulong)p;
         of_printf("%s: dom0 mod string: %s\n", __func__, p);
     }